package com.eorchis.module.trainingquestionnaire.ui.commond;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.validator.constraints.NotBlank;

import com.eorchis.core.annotation.AuditIgnore;
import com.eorchis.core.annotation.AuditProperty;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.ui.commond.ICommonField;
import com.eorchis.core.ui.commond.ICommond;
import com.eorchis.module.basedata.domain.BaseData;
import com.eorchis.module.department.domain.Department;
import com.eorchis.module.trainingneeds.domain.QueryQuestionBankBean;
import com.eorchis.module.trainingquestionnaire.domain.PreviewQuestionnaireBean;
import com.eorchis.module.trainingquestionnaire.domain.QuestionnaireEntity;
import com.eorchis.module.user.domain.User;
import com.eorchis.utils.utils.PropertyUtil;
import com.eorchis.module.trainingquestionnaire.domain.userquestionnairebean.StudentPageInfo;

/**
 * Title: QuestionnaireValidCommond<br>
 * Description: 调查问卷ValidCommond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Administrator
 * @createDate 2014-08-27
 * @version $Revision$
 */
public class QuestionnaireValidCommond implements ICommond,ICommonField {
	
	
	private String className;//班级名称
	private String ministrieName;//承办部委
	private String sponsorName;//主办单位
	private String school;//举办院校
	private String beginDateStr;//开班时间
	private String endDateStr;//结班时间
	private String assessStartDay;//结束时间前几天
	private String assessEndDay;//结束时间后几天
	private String assessCourseStartDay;//结束时间前几天
	private String assessCourseEndDay;//结束时间后几天
	private String  classId;//班级ID
	private String[] courseIds;//课程数组
	private  List<QueryQuestionBankBean>  queryQuestionBankList;
	private StudentPageInfo studentPageInfo;
	private String []  questionnaireIds;//问卷数组
	private QuestionnaireEntity questionnaire;
	
	private Integer assessmentState;//评估状态
	private String courseName;//课程名称
	private String speaker;//课程主讲教师
	private String speakWay;//授课方式
	private String courseId;//课程ID
	
	private int flag;//用以区分是班级还是课程  1：班级  2：课程
	private int questionnaireMethod;//用以区分实名评估还是匿名评估	1:实名	2:匿名
	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getSpeaker() {
		return speaker;
	}

	public void setSpeaker(String speaker) {
		this.speaker = speaker;
	}

	public String getSpeakWay() {
		return speakWay;
	}

	public void setSpeakWay(String speakWay) {
		this.speakWay = speakWay;
	}

	/**
	 * 活动状态：启用
	 */
	public static final Integer IS_ENABLE=new Integer(1);
	/**
	 * 活动状态：作废
	 */
	public static final Integer IS_CANCEL=new Integer(2);
	
	private PreviewQuestionnaireBean previewQuestionnaireBean;//预览问卷信息
	
	private Integer assessExport;//评估结果导出	 1:原始汇总 2:学员详情
	
	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getMinistrieName() {
		return ministrieName;
	}

	public void setMinistrieName(String ministrieName) {
		this.ministrieName = ministrieName;
	}

	public String getBeginDateStr() {
		return beginDateStr;
	}

	public void setBeginDateStr(String beginDateStr) {
		this.beginDateStr = beginDateStr;
	}

	public String getEndDateStr() {
		return endDateStr;
	}

	public void setEndDateStr(String endDateStr) {
		this.endDateStr = endDateStr;
	}

	public StudentPageInfo getStudentPageInfo() {
		return studentPageInfo;
	}

	public void setStudentPageInfo(StudentPageInfo studentPageInfo) {
		this.studentPageInfo = studentPageInfo;
	}

	public List<QueryQuestionBankBean> getQueryQuestionBankList() {
		return queryQuestionBankList;
	}

	public void setQueryQuestionBankList(List<QueryQuestionBankBean> queryQuestionBankList) {
		this.queryQuestionBankList = queryQuestionBankList;
	}

	public String[] getQuestionnaireIds() {
		return questionnaireIds;
	}

	public void setQuestionnaireIds(String[] questionnaireIds) {
		this.questionnaireIds = questionnaireIds;
	}

	public String getAssessStartDay() {
		return assessStartDay;
	}

	public void setAssessStartDay(String assessStartDay) {
		this.assessStartDay = assessStartDay;
	}

	public String getAssessEndDay() {
		return assessEndDay;
	}

	public void setAssessEndDay(String assessEndDay) {
		this.assessEndDay = assessEndDay;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public QuestionnaireValidCommond(){
		questionnaire = new QuestionnaireEntity();
	}
	
	public QuestionnaireValidCommond(QuestionnaireEntity questionnaire){
		this.questionnaire = questionnaire;
	}

	@AuditIgnore
	public Serializable getEntityID() {
		return questionnaire.getQuestionnaireId();
	}

	public IBaseEntity toEntity() {
		return questionnaire;
	}

	/**
	 * 获取ID
	 */	
	@AuditProperty(value="ID")
	public String getQuestionnaireId() {
		return questionnaire.getQuestionnaireId();
	}
	/**
	 * 设置ID
	 */		
	public void setQuestionnaireId(String questionnaireId) {
		questionnaire.setQuestionnaireId(questionnaireId);
	}
	/**
	 * 获取名称
	 */	
	@AuditProperty(value="名称")
	public String getQuestionnaireName() {
		return questionnaire.getQuestionnaireName();
	}
	/**
	 * 设置名称
	 */		
	public void setQuestionnaireName(String questionnaireName) {
		questionnaire.setQuestionnaireName(questionnaireName);
	}
	/**
	 * 获取类型
	 */	
	@AuditProperty(value="类型")
	public String getQuestionnaireType() {
		String questionnaireType=null;
		if(PropertyUtil.objectNotEmpty(questionnaire.getQuestionnaireType()))
		{
			questionnaireType=questionnaire.getQuestionnaireType().getDataCode();
		}
		return questionnaireType;
	}
	/**
	 * 设置类型
	 */		
	public void setQuestionnaireType(String questionnaireType) {
		BaseData b = new BaseData();
		b.setDataCode(questionnaireType);
		questionnaire.setQuestionnaireType(b);
	}
	/**
	 * 获取类型
	 */	
	@AuditProperty(value="类型")
	public Integer getSurveyObjectType() {
		return questionnaire.getSurveyObjectType();
	}
	/**
	 * 设置类型
	 */		
	public void setSurveyObjectType(Integer surveyObjectType) {
		questionnaire.setSurveyObjectType(surveyObjectType);
	}
	/**
	 * 获取日期
	 */	
	@AuditProperty(value="日期")
	public Date getBeginDate() {
		return questionnaire.getBeginDate();
	}
	/**
	 * 设置日期
	 */		
	public void setBeginDate(Date beginDate) {
		questionnaire.setBeginDate(beginDate);
	}
	/**
	 * 获取日期
	 */	
	@AuditProperty(value="日期")
	public Date getEndDate() {
		return questionnaire.getEndDate();
	}
	/**
	 * 设置日期
	 */		
	public void setEndDate(Date endDate) {
		questionnaire.setEndDate(endDate);
	}
	/**
	 * 获取创建人id
	 */	
	@NotBlank(message="创建人id不能为空")
	@AuditProperty(value="创建人id")
	public User getUser() {
		return questionnaire.getUser();
	}
	/**
	 * 设置创建人id
	 */		
	public void setUser(User user) {
		questionnaire.setUser(user);
	}
	/**
	 * 获取创建部门id
	 */	
	@NotBlank(message="创建部门id不能为空")
	@AuditProperty(value="创建部门id")
	@JsonIgnore public Department getDepartment() {
		return questionnaire.getDepartment();
	}
	/**
	 * 设置创建部门id
	 */		
	public void setDepartment(Department department) {
		questionnaire.setDepartment(department);
	}
	/**
	 * 获取类型
	 */	
	@AuditProperty(value="类型")
	public Integer getSurveyType() {
		return questionnaire.getSurveyType();
	}
	/**
	 * 设置类型
	 */		
	public void setSurveyType(Integer surveyType) {
		questionnaire.setSurveyType(surveyType);
	}
	/**
	 * 获取edu说明
	 */	
	@AuditProperty(value="edu说明")
	public String getQuestionnaireExplain() {
		return questionnaire.getQuestionnaireExplain();
	}
	/**
	 * 设置edu说明
	 */		
	public void setQuestionnaireExplain(String questionnaireExplain) {
		questionnaire.setQuestionnaireExplain(questionnaireExplain);
	}
	/**
	 * 获取状态
	 */	
	@AuditProperty(value="状态")
	public Integer getPublishState() {
		return questionnaire.getPublishState();
	}
	/**
	 * 设置状态
	 */		
	public void setPublishState(Integer publishState) {
		questionnaire.setPublishState(publishState);
	}
	/**
	 * 获取创建日期
	 */
	public Date getCreateDate() {
		return questionnaire.getCreateDate();
	}
	/**
	 * 设置创建日期
	 */	
	public void setCreateDate(Date createDate) {
		questionnaire.setCreateDate(createDate);
	}
	/**
	 * 获取活动状态
	 */
	public Integer getActiveState() {
		return questionnaire.getActiveState();
	}
	/**
	 * 设置活动状态
	 */	
	public void setActiveState(Integer activeState) {
		questionnaire.setActiveState(activeState);
	}

	public PreviewQuestionnaireBean getPreviewQuestionnaireBean()
	{
		return previewQuestionnaireBean;
	}

	public void setPreviewQuestionnaireBean(
			PreviewQuestionnaireBean previewQuestionnaireBean)
	{
		this.previewQuestionnaireBean = previewQuestionnaireBean;
	}

	public Integer getAssessExport() {
		return assessExport;
	}

	public void setAssessExport(Integer assessExport) {
		this.assessExport = assessExport;
	}

	public String getAssessCourseStartDay() {
		return assessCourseStartDay;
	}

	public void setAssessCourseStartDay(String assessCourseStartDay) {
		this.assessCourseStartDay = assessCourseStartDay;
	}

	public String getAssessCourseEndDay() {
		return assessCourseEndDay;
	}

	public void setAssessCourseEndDay(String assessCourseEndDay) {
		this.assessCourseEndDay = assessCourseEndDay;
	}

	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public Integer getAssessmentState() {
		return assessmentState;
	}

	public void setAssessmentState(Integer assessmentState) {
		this.assessmentState = assessmentState;
	}

	public int getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

	public String[] getCourseIds() {
		return courseIds;
	}

	public void setCourseIds(String[] courseIds) {
		this.courseIds = courseIds;
	}

	public String getSponsorName() {
		return sponsorName;
	}

	public void setSponsorName(String sponsorName) {
		this.sponsorName = sponsorName;
	}

	public int getQuestionnaireMethod() {
		return questionnaireMethod;
	}

	public void setQuestionnaireMethod(int questionnaireMethod) {
		this.questionnaireMethod = questionnaireMethod;
	}

}
